<?php
namespace app\admin\Validate;
use think\Validate;

class Admin extends Validate{

    //验证规则
    protected $rule = [
        'ad_account'  =>'require|unique:admin|max:16|alphaDash',
        'password'    =>'require|max:16|min:6|alphaNum',
        'email'       =>'require|email',
        'code'        => 'require'
    ];

    protected $message  =  [
        'ad_account.require'     => '账号必须填写',
        'ad_account.unique'      => '此账号已存在，请检查后重试',
        'ad_account.max'         => '账号长度不能超过16位',
        'ad_account.alphaDash'   => '账号只支持英文字母、数字、破折号-、下划线_',
        'password.require'       => '密码必须填写',
        'password.max'           => '密码长度不能超过16位',
        'password.min'           => '密码长度不能低于6位',
        'password.alphaNum'      => '密码只支持英文字母、数字',
        'email.require'          => '邮箱必须填写',
        'email.email'            => '邮箱格式不正确',
        'code.require'           => '验证码必须填写',
    ];
    

}